<%@ page contentType="text/html;charset=UTF-8" language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/include/jstl.jsp" %>
<script   language= "javascript "> 
$(document).ready(function(){
    //转化日期格式
    turnDateFormat();     
});  
function change(objs){ 
    if(objs == "1" || objs == "2"){
        document.getElementById("code").value = "";
        var txtN = document.getElementById("code"); 
        txtN.readOnly = true;
    }
    if(objs == "3"){
        var txtN = document.getElementById("code"); 
        txtN.readOnly = false;
    }
}

function checkNull(objs){
    var ob  = document.getElementById("type");
    var obj = ob.value;
    if(obj != '3'){
        alert("请选指定用户");    
        document.getElementById("code").value="";
    }
}

//刷新本页面
function reflashTab() {
    navTab.reloadFlag('540800.tran');
    navTab.openTab('540800.tran', '540800.tran', {title:'商户限额管理', fresh:false}); 
}
</script> 
<html>    
<body onload="change(document.getElementById("LIMIT_USER_TYPE").value)">        
    <form id="pagerForm" method="post" action="540800.tran">
        <input type="hidden" name="pageNum"  value="${ETF.PAGENUM}" />
    </form> 
    <div class="pageHeader">
        <div class="searchBar">
            <form  onsubmit="return navTabSearch(this)" id="billQuery" name="billQuery" action="540800.tran" method="post">
                <table class="searchContent">
                    <tr>             
                        <td id="td3">
                            启用状态:   
                            <select name="IS_USE"  > 
                                <option value="" >--请选择--</option>
                                <option value="1" <c:if test="${ETF.IS_USE =='1'}"> selected="selected"</c:if>>已启用</option>
                                <option value="0" <c:if test="${ETF.IS_USE =='0'}"> selected="selected"</c:if>>未启用</option>
                            </select>                              
                        </td>            
                        <td>
                            生(失)效时间范围：
                            <input name="LIMIT_START_DATE"  format="yyyy-MM-dd"  value="${ETF.LIMIT_START_DATE}"  type="text"  class="date"  yearstart="-80" yearend="5" readonly="true"  size="10"/>
                            <span class="info" >~~</span>
                            <input  name="LIMIT_END_DATE"   format="yyyy-MM-dd"   value="${ETF.LIMIT_END_DATE}"  type="text"  class="date" yearstart="-80" yearend="5" readonly="true"  size="10" />
                        </td>               
                    </tr>               
                </table>
                <div class="subBar">                
                    <ul>
                        <c:if test="${ETF.CON_BUT_DEV==0 || (ETF.CON_BUT_DEV==1 && ETF.BUT_ADD==1)}">
                            <li><a class="button" href="540863.tran"  title="添加商户限额" target="navTab"  rel="userLimit3"><span>添加</span></a></li>
                        </c:if>
                        <li><div class="buttonActive"><div class="buttonContent"><button type="submit">查询</button></div></div></li>
                    </ul>
                </div>
            </form>
        </div>
    </div>
    <div class="pageContent">
        <div class="panelBar"></div>
        <table class="table" width="100%" layoutH="139">
            <thead>
                <tr>
                    <!--商户状态类型是否显示，1:显示 0;不显示 --> 
                    <c:if test="${ETF.IS_SHOW_LIMIT_COMP_TYPE != '0'}">
                        <th width="10%">状态类型</th>
                    </c:if>
                    <th width="10%">商户编号</th>
                    <th width="10%">支付方式</th>
                    <th width="10%">生效时间</th>
                    <th width="10%">失效时间</th>
                    <th width="5%" >启用状态</th>
                    <th width="8%" >修改人</th>
                    <th width="10%">修改时间</th>
                    <th width="10%">操作</th>
                </tr>
            </thead>
            <tbody>
                <c:choose>
                    <c:when test="${ETF.RSPCOD=='000000'}">
                        <c:forEach items="${ETF.REC}" var="GRP">    
                            <!-- 商户状态类型是否显示，1:显示 0;不显示-->
                            <c:if test="${ETF.IS_SHOW_LIMIT_COMP_TYPE != '0'}">
                                <td>
                                    <c:if test="${GRP.LIMIT_TYPE == null }"><div style="color:dimgray" >未知</div></c:if>
                                    <c:if test="${GRP.LIMIT_TYPE == '1'}" >所有商户</c:if> 
                                    <c:if test="${GRP.LIMIT_TYPE == '3' }">指定商户</c:if>    
                                 </td>    
                            </c:if>
                            
                            <td>
                                <c:if test="${GRP.LIMIT_COMP_CODE == null}"><div style="color:dimgray" >----</div></c:if>
                                <c:if test="${GRP.LIMIT_COMP_CODE != null}"> ${GRP.LIMIT_COMP_CODE}</c:if>    
                            </td>    
                            <!-- 用户业务类型及支付方式是否显示，1:显示 0;不显示-->
                            <td> <!-- 支付方式-->
                                <c:if test="${GRP.LIMIT_BUS_CLIENT =='00'}">全部</c:if>
                                <c:if test="${GRP.LIMIT_BUS_CLIENT =='01'}">网银</c:if>
                                <c:if test="${GRP.LIMIT_BUS_CLIENT =='02'}">终端</c:if>
                                <c:if test="${GRP.LIMIT_BUS_CLIENT =='03'}">消费卡</c:if>
                                <c:if test="${GRP.LIMIT_BUS_CLIENT =='04'}">虚拟账户</c:if>
                                <c:if test="${GRP.LIMIT_BUS_CLIENT =='05'}">快捷支付</c:if>
                            </td>
                            <td class="dateFormatTd"><c:if test="${GRP.LIMIT_START_DATE== '19700101'}">永久</c:if><c:if test="${GRP.LIMIT_START_DATE != '19700101'}">${GRP.LIMIT_START_DATE}</c:if></td>
                                <td class="dateFormatTd"><c:if test="${GRP.LIMIT_END_DATE == '29991231'}">永久</c:if><c:if test="${GRP.LIMIT_END_DATE != '29991231'}">${GRP.LIMIT_END_DATE}</c:if></td>                                      
                                <td>
                                    <c:if test="${GRP.IS_USE =='0'}"><div style="color:dimgray">未启用</div></c:if>
                                    <c:if test="${GRP.IS_USE =='1'}">已启用</c:if>
                                </td>    
                                <td>${GRP.UPDATE_NAME} </td>    
                                <td class="dateFormatTd">${GRP.UPDATE_DATE}</td>
                                <td>
                                    <c:if test="${ETF.CON_BUT_DEV==0 || (ETF.CON_BUT_DEV==1 && ETF.BUT_LOOK==1)}">
                                        <a title="查看明细信息" target="navTab" href="540801.tran?ID=${GRP.ID}&LIMIT_BUS_CODE=${GRP.LIMIT_BUS_CODE}&LIMIT_BUS_CLIENT=${GRP.LIMIT_BUS_CLIENT}" ><font color="#15428b">详 情</font></a>
                                    </c:if>
                                    <c:if test="${ETF.CON_BUT_DEV==0 || (ETF.CON_BUT_DEV==1 && ETF.BUT_MODIFY==1)}">
                                        |  <a title="编辑商户限额" target="navTab" href="540866.tran?ID=${GRP.ID}&COMP_CODE=${GRP.COMP_CODE}&LIMIT_BUS_CODE=${GRP.LIMIT_BUS_CODE}&LIMIT_BUS_CLIENT=${GRP.LIMIT_BUS_CLIENT}" rel="userLimit" ><font color="#15428b">修 改</font></a>
                                    </c:if>
                                    <c:if test="${ETF.CON_BUT_DEV==0 || (ETF.CON_BUT_DEV==1 && ETF.BUT_DELETE==1)}">
                                        |  <a title="确定删除记录吗？" target="ajaxTodo" href="540861.tran?ID=${GRP.ID}&COMP_CODE=${GRP.COMP_CODE}" ><font color="#15428b">删 除</font></a>
                                    </c:if>
                                </td>
                            </tr>
                        </c:forEach>                        
                    </c:when>
                    <c:otherwise>
                        <tr>
                            <td>没有符合条件的记录</td>
                        </tr>
                    </c:otherwise>
                </c:choose>
            </tbody>
        </table>
        <div class="panelBar">
            <c:if test="${ETF.RSPCOD=='000000'}">
                <ul class="toolBar" >
                    <c:if test="${ETF.CON_BUT_DEV==0 || (ETF.CON_BUT_DEV==1 && ETF.BUT_EXPORT ==1)}">
                        <li><a  class="icon" href="${pageContext.request.contextPath}/540819.tran?IS_USE=${ETF.IS_USE}"  target="dwzExport" targetType="navTab" title="确定导出这些记录吗?"><span>导出EXCEL</span></a></li>
                    </c:if>
                </ul>                          
            </c:if>
            <div class="pages"><span>共[${ETF.TOLCNT}]条,每页显示${ETF.NUMPERPAGE}条,当前第
                <c:choose>
                    <c:when test="${ETF.TOLCNT==0}">0</c:when>
                    <c:when test="${ETF.TOLCNT>0&&ETF.TOLCNT<=ETF.NUMPERPAGE}">1-${ETF.TOLCNT}</c:when>  
                    <c:otherwise>
                        <c:choose>
                            <c:when test="${(ETF.PAGENUM-1)*ETF.NUMPERPAGE+1>ETF.TOLCNT}">${ETF.STARTINDEX}</c:when>
                            <c:otherwise>${(ETF.PAGENUM-1)*ETF.NUMPERPAGE+1}</c:otherwise>
                        </c:choose>
                        -
                        <c:choose>                     
                            <c:when test="${ETF.PAGENUM*ETF.NUMPERPAGE>=ETF.TOLCNT}">${ETF.TOLCNT}</c:when>           
                            <c:otherwise>${ETF.PAGENUM*ETF.NUMPERPAGE}</c:otherwise>                 
                        </c:choose>
                    </c:otherwise>                
                </c:choose>
                条</span>
            </div>             
            <div class="pagination" targetType="navTab" totalCount="${ETF.TOLCNT}" numPerPage="${ETF.NUMPERPAGE}" pageNumShown="${ETF.PAGENUMSHOWN}" currentPage="${ETF.PAGENUM}"></div>
        </div>
    </div>                                                                                                    
</body>
</html>